package com.scsj.supermarket.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.scsj.supermarket.R;
import com.scsj.supermarket.bean.TwoPageBean;

import java.util.List;

/**
 *  首页功能键分页
 */

public class TwoPageAdapter extends BaseQuickAdapter<TwoPageBean, BaseViewHolder> {
    public TwoPageAdapter(List data) {
        super(R.layout.item_for_two_page_layout, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, TwoPageBean item) {
        helper.setImageResource(R.id.icon_iv, item.getImg());
        helper.setText(R.id.title_tv, item.getTitle());
    }
}
